const RequestERP = {
    sendMessageLogDetail(requestId) {
        const url = `/api/20011001/messageLog/detail?requestId=${encodeURIComponent(requestId)}`;
        return new Promise((resolve, reject) => {
            GM_xmlhttpRequest({
                method: 'POST',
                url: url,
                headers: {
                    'Content-Type': 'application/json',
                    'Accept': 'application/json'
                },
                onload: function (response) {
                    const jsonData = JSON.parse(response.responseText);
                    resolve(jsonData);
                },
                onerror: function (error) {
                    console.error('请求失败:', error);
                },
                ontimeout: function () {
                    console.error('请求超时');
                }
            });
        });
    },
    getAboutInfo(){
        const url = `/api/Mysoft.PubPlatform.Nav.AppServices.NavAppService/GetAboutInfo`;
        return new Promise((resolve, reject) => {
            GM_xmlhttpRequest({
                method: 'POST',
                url: url,
                headers: {
                    'Content-Type': 'application/json',
                    'Accept': 'application/json'
                },
                onload: function (response) {
                    const jsonData = JSON.parse(response.responseText);
                    resolve(jsonData);
                },
                onerror: function (error) {
                    console.error('请求失败:', error);
                },
                ontimeout: function () {
                    console.error('请求超时');
                }
            });
        });
    }
};